/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package meteocal.entity;

import java.util.Calendar;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

/**
 *
 * @author andrea
 */
@Entity
@DiscriminatorValue(value = "R")
public class RescheduleNotification extends Notification {
    
    @NotNull
    private String newTitle;    
    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    private Calendar newDate;
    @NotNull
    private String newPlace;
    
    /*
        Getters and Setters
    */
    public Calendar getNewDate() {
        return newDate;
    }
    
    public String getNewPlace() {
        return newPlace;
    }

    public void setNewDate(Calendar newDate) {
        this.newDate = newDate;
    }

    public void setNewPlace(String newPlace) {
        this.newPlace = newPlace;
    }

    public String getNewTitle() {
        return newTitle;
    }

    public void setNewTitle(String newTitle) {
        this.newTitle = newTitle;
    }   
    
    @Override
    public String toString(){
        return String.format("Event modified: %s", event.toString());
    }
}
